package com.qyer.search.storm.util;

import java.io.Serializable;

/**
 * Created by tangzheng on 16/8/14.
 */
public class Continent implements Serializable{
  private int id;
  private String continent;

  public Continent() {
  }

  public Continent(String continent) {
    this.continent = continent;
  }

  public Continent(int id, String continent) {
    this.id = id;
    this.continent = continent;
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public String getContinent() {
    return continent;
  }

  public void setContinent(String continent) {
    this.continent = continent;
  }

  @Override public boolean equals(Object o) {
    if (this == o)
      return true;
    if (o == null || getClass() != o.getClass())
      return false;

    Continent continent1 = (Continent) o;

    if (id != continent1.id)
      return false;
    return continent.equals(continent1.continent);

  }

  @Override public int hashCode() {
    int result = id;
    result = 31 * result + continent.hashCode();
    return result;
  }

  @Override public String toString() {
    return "Continent{" +
      "id=" + id +
      ", continent='" + continent + '\'' +
      '}';
  }
}
